/* 标签页会话管理器 - 弹出窗口样式 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f9f9fa;
  width: 410px;
  max-height: 800px;
  overflow-x: hidden;
}

.container {
  padding: 14px;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #0060df;
  text-align: center;
}

h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
  color: #0c0c0d;
}

.section {
  margin-bottom: 10px;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(12, 12, 13, 0.1);
}

.input-group {
  display: flex;
  margin-bottom: 8px;
}

input[type="text"] {
  flex: 1;
  padding: 6px;
  border: 1px solid #d7d7db;
  border-radius: 2px;
  font-size: 14px;
  margin-right: 8px;
}

button {
  background-color: #4a89e8;
  color: white;
  border: none;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.session-actions button {
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

button:hover {
  background-color: #3a6fc0;
}

button:active {
  background-color: #2a5ca0;
}

.status {
  margin-top: 8px;
  font-size: 13px;
  height: 20px;
  display: inline-block;
}

.status.success {
  color: #058b00;
}

.status.error {
  color: #d70022;
}

.sessions-list {
  max-height: 330px;
  overflow-y: auto;
}

.empty-message {
  color: #737373;
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #ededf0;
}

.session-item:last-child {
  border-bottom: none;
}

.session-info {
  flex: 1;
}

.session-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #0c0c0d;
}

.session-meta {
  font-size: 12px;
  color: #737373;
}

.session-date {
  margin-right: 12px;
}

.session-actions {
  display: flex;
  gap: 8px;
}

.restore-btn {
  background-color: #4a89e8;
}

.edit-btn {
  background-color: #20a0a0;
}

.edit-btn:hover {
  background-color: #188787;
}

.delete-btn {
  background-color: #e54d4d;
}

.delete-btn:hover {
  background-color: #d13f3f;
}

/* 编辑会话表单样式 */
.edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-name-group{
  flex-direction: row;
}
.edit-name-group label{
  line-height: 32px;
  vertical-align: middle;
}

.form-group label {
  font-weight: 500;
  font-size: 14px;
  color: #0c0c0d;
}

.edit-tabs-list {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  border: 1px solid #ededf0;
  border-radius: 4px;
  padding: 8px;
}

.edit-tab-item {
  display: flex;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #ededf0;
}

.edit-tab-item:last-child {
  border-bottom: none;
}

.edit-tab-favicon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.edit-tab-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-tab-remove {
  background-color: transparent;
  color: #d70022;
  border: none;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
}

.edit-tab-remove:hover {
  background-color: #ffebee;
}

/* 对话框样式 */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog-overlay.hidden {
  display: none;
}

.dialog-container {
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(12, 12, 13, 0.2);
  width: 300px;
  max-width: 90%;
  max-height: 90vh;
  overflow: hidden;
}

.dialog-header {
  padding: 16px;
  border-bottom: 1px solid #ededf0;
}

.dialog-header h3 {
  margin: 0;
  font-size: 16px;
  color: #0c0c0d;
}

.dialog-content {
  padding:8px  16px;
}

.dialog-content p {
  margin: 0;
  color: #4a4a4f;
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid #ededf0;
}

.dialog-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  margin-left: 8px;
  transition: background-color 0.15s;
}

.cancel-btn {
  background-color: #f9f9fa;
  color: #0c0c0d;
  border: 1px solid #d7d7db;
}

.cancel-btn:hover {
  background-color: #ededf0;
}

.confirm-btn {
  background-color: #e54d4d;
  color: white;
}

.confirm-btn:hover {
  background-color: #d13f3f;
}

/* 设置区域样式 */
.settings-section {
  /* margin: 16px 0;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(12, 12, 13, 0.1); */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-right: 12px;
}

.settings-section h2 {
  font-size: 16px;
  font-weight: 500;
  display:inherit;
  align-items: center;
  margin: 0;
  color: #0c0c0d;
}

.setting-item {
  display: flex;
  align-items: center;
  margin: 12px 0;
}

.setting-label {
  margin:0 12px;
  font-size: 14px;
  color: #0c0c0d;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d7d7db;
  transition: .15s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .15s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4a89e8;
}

input:checked + .slider:before {
  transform: translateX(26px);
}